package kyo;

public enum VtColor {
     BLACK(30),
     RED(31),
     GREEN(32),
     YELLOW(33),
     BLUE(34),
     PURPLE(35),
     CYAN(36),
     WHITE(37);

    private int code;

    VtColor(int code) {
        this.code = code;
    }

    // 背景            code+10
    public int getBack() {
        return code + 10;
    }

    // 前景            code
    public int get() {
        return code;
    }
}

